<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@include file="/WEB-INF/jsp/include/header.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
	<title>仓储管理系统</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.7.1.min.js"></script>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui-1.2.5/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui-1.2.5/themes/icon.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/table.css">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/plugins/jquery.validatebox.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/validatebox.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/globalMaps.js"></script>
		<script type="text/javascript">
			var meaa = '${salme.meaa}';
			var meab = '${salme.meab}';
			var meac = '${salme.meac}';
			<c:forEach items="${globalUmUser.mdafs}" var="mdaf" varStatus="s">
				globalMaps.put('${mdaf}', '${mdaf}');
			</c:forEach>
		</script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/sal/salmf.js"></script>
	</head>
	<body>
		<div id="menuDiv" style="padding:5px;background:#fafafa;width:980px;"></div>
		<div id="listDiv" style="padding:3px 2px;height:30px;width:980px">
			<table>
				<tr>
					<td align="right">单别：</td>
					<td align="left"><input type="text" class="easyui-validatebox" id="salmeAa" name="meab" maxlength="20" required="true" value="${salme.meaa}" readOnly="readonly" /></td>

					<td align="right">单号：</td>
					<td align="left"><input type="text" class="easyui-validatebox" id="salmeAb" name="meab" maxlength="20" required="true" value="${salme.meab}" readOnly="readonly"/></td>
					<td align="right">单据日期：</td>
					<td align="left"><input type="text" name="mead" id="salmeAd" class="easyui-validatebox" maxlength="20" required="true" value="${salme.mead}" readOnly="readonly"></td>
				</tr>
			</table>
		</div>
		<!-- 表格 -->
		<table id="salmfTable" border="0" cellspacing="0" cellpadding="0" width="98%" pagination="true" remoteSort="false" singleSelect="false" idField="mfac" showFooter="false" striped="true" url="<c:url value='/salmf/salmfList.xhtml'><c:param name="meaa" value="${meaa}"/><c:param name="meab" value="${meab}"/></c:url>">
			<thead>
				<tr align="center">
					<th field="mfac" width="70">序号</th>
					<th field="mfad" width="100" >客户编号</th>
					<th field="mfae" width="100">客户名称</th>
					<th field="mfal" width="150">仓库</th>
					<th field="mfaf" width="70">物料编号</th>
					<th field="mfag" width="100">物料描述1</th>
					<th field="mfah" width="100">物料描述2</th>
					<th field="mfai" width="50" >单位</th>
					<th field="mfaj" width="50">数量</th>
					<th field="mfak" width="50">已发数量</th>
				</tr>
			</thead>
		</table>
		
		<!-- 添加 -->
		<div id="salmfAdd" icon="icon-save" style="padding:5px;width:300px;height:400px;">
			<form method="post" name="addForm" id="addForm">
				<input type="hidden" id="salmfAddMfaa" name="mfaa" value="${meaa}"/>
				<input type="hidden" id="salmfAddMfab" name="mfab" value="${meab}"/>
				<div class="ToolTip_Form" id="salmfAddForm" onkeydown="if(event.keyCode==13){salmfAdd();}">
					<table>
						<tr>
							<td align="right">客户编号：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="salmfAddMfad" name="mfad" /></td>
						</tr>
						<tr>
							<td align="right">客户名称：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="salmfAddMfae" name="mfae" /></td>
						</tr>
						<tr>
							<td align="right">仓库：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="salmfAddMfal" name="mfal"  required="true" missingMessage="仓库不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">物料编号：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="salmfAddMfaf" name="mfaf"  required="true" missingMessage="物料编号不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">物料描述1：</td>
							<td align="left"><textarea class="easyui-validatebox" id="salmfAddMfag" name="mfag"></textarea></td>
						</tr>
						<tr>
							<td align="right">物料描述2：</td>
							<td align="left"><textarea class="easyui-validatebox" id="salmfAddMfah" name="mfah"></textarea></td>
						</tr>
						<tr>
							<td align="right">单位：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="salmfAddMfai" name="mfai"  required="true" missingMessage="单位不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">数量：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="salmfAddMfaj" name="mfaj"  required="true" validType="isDouble" missingMessage="数量不能为空!"/></td>
						</tr>
						<tr>
							<td colspan="2" align="center">
								<a href="#" class="easyui-linkbutton" icon="icon-ok" onclick="salmfAdd();">提交</a>
								<a href="#" class="easyui-linkbutton" icon="icon-redo" onclick="closeDialogAdd();">关闭</a>
							</td>
						</tr>
					</table>
				</div>
			</form>
		</div>
		<!-- 编辑 -->
		<div id="salmfUpdate" icon="icon-save" style="padding:5px;width:300px;height:400px;">
			<form method="post" name="updateForm" id="updateForm">
				<input type="hidden" id="salmfUpdateMfaa" name="mfaa" value="${meaa}"/>
				<input type="hidden" id="salmfUpdateMfab" name="mfab" value="${meab}"/>
				<input type="hidden" id="salmfUpdateMfac" name="mfac" value=""/>
				<div class="ToolTip_Form" id="salmfUpdateForm" onkeydown="if(event.keyCode==13){salmfUpdate();}">
					<table>
						<tr>
							<td align="right">客户编号：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="salmfUpdateMfad" name="mfad" /></td>
						</tr>
						<tr>
							<td align="right">客户名称：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="salmfUpdateMfae" name="mfae" /></td>
						</tr>
						<tr>
							<td align="right">仓库：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="salmfUpdateMfal" name="mfal"  required="true" missingMessage="仓库不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">物料编号：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="salmfUpdateMfaf" name="mfaf"  required="true" missingMessage="物料编号不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">物料描述1：</td>
							<td align="left"><textarea class="easyui-validatebox" id="salmfUpdateMfag" name="mfag"></textarea></td>
						</tr>
						<tr>
							<td align="right">物料描述2：</td>
							<td align="left"><textarea class="easyui-validatebox" id="salmfUpdateMfah" name="mfah"></textarea></td>
						</tr>
						<tr>
							<td align="right">单位：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="salmfUpdateMfai" name="mfai"  required="true" missingMessage="单位不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">数量：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="salmfUpdateMfaj" name="mfaj"  required="true" validType="isDouble" missingMessage="数量不能为空!"/></td>
						</tr>
						<tr>
							<td colspan="2" align="center">
								<a href="#" class="easyui-linkbutton" icon="icon-ok" onclick="salmfUpdate();">提交</a>
								<a href="#" class="easyui-linkbutton" icon="icon-redo" onclick="closeDialogUpdate();">关闭</a>
							</td>
						</tr>
					</table>
				</div>
			</form>
		</div>
	</body>
</html>